﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Negocios;
using System.Data;
using System.Data.Entity;

namespace Presentacion
{
    public partial class frmAgregarPersona : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["object"] = "asdasdad";
            //var user = (DTOTipoPersona)Session["object"];
        }

        protected void btnGuardar_Click(object sender, EventArgs e)
        {
           // ControladoraTipoPersona.getAll();
            //var tp = ControladoraTipoPersona.getTipoPersona(ddlTipoPersona.Text.ToString());
            //int codtipopersona = Convert.ToInt16(tp.codtipopersona);
            ControladoraPersona.addPersona(ddlTipoPersona.SelectedValue.ToString(),txtNombre.Text, txtApellido.Text, txtTelefono.Text, txtCelular.Text, txtDNI.Text, txtEmail.Text, Convert.ToDateTime(txtFechaNacimiento.Text), Convert.ToInt16(txtCodigoPostal.Text), txtCuidad.Text, txtProvincia.Text);
        }
    }
}